package zhenniu.best.webview.zhenniuwebview.network;


import com.google.gson.JsonObject;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.Headers;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import zhenniu.best.webview.zhenniuwebview.bean.VersionBean;

/**
 * 作者：xxy on 2018/3/2 09:56
 */
public class Network {
//    public static final String BASE = "http://www.zhenniub.cn/shares/api.php/";    //正式url
//    public static final String BASE = "http://test.zhenniub.cn/shares/api.php/";    //测试url
    public static final String VERSIONURL = "http://static.pzguanjia.com:8000/md/";    //升级版本url
//public static final String VERSIONURL = "http://106.14.140.7:8000/md/";    //升级版本url



    /**
     * 参数类
     */
    public static class UserParam {
        public static final String ACCOUNT = "acc";   //账号

    }


    /**
     * api请求类
     */
    public interface ApiService {


        // 版本更新
//        @Multipart
        @POST("appVersion/appVersionUpdate")
        @Headers({"Content-Type: application/json","Accept: application/json"})//需要添加头
//        @Headers({"Content-Type: application/json;charset=utf-8"})
//        Observable<VersionBean> updateVersion(@Part MultipartBody.Part fileA);
        Observable<JsonObject> updateVersion(@Body RequestBody info);
    }
}
